<?php 

if ($currentObject->status=="N")
{

if (getParameter("send_response"))
{
	$msg="Cher ".$currentObject->name."<br/><br/>";
	$msg.="Ce mail est la rÃƒÂ©ponse de la question que vous avez posÃƒÂ© sur notre site.<br/><br/>";
	$msg.="Question : <br/>";
	$msg.=$currentObject->question."<br/><br/>";
	$msg.="RÃƒÂ©ponse : <br/>";
	$msg.=getParameter("reponse")."<br/><br/>";
	sendMailTo($currentObject->mail, $msg);
	$sSql="UPDATE shop_questions SET response='".getParameter("reponse")."', status='R' WHERE id=".$currentObject->id;
	
	$GLOBALS["conn"]->Execute($sSql);
	ShowSuccess("La rÃƒÂ©ponse ÃƒÂ  bien ÃƒÂ©tÃƒÂ© envoyÃƒÂ©e.");
}else{

?>
<form action="<?php echo createRelativeUrl("action","send")?>" method="POST">
<div class="reponse">
RÃƒÂ©ponse : <br/><?php formTextArea("reponse","100%",5,""); ?><br/>
<input type="submit" value="Envoyer" name="send_response">
</div>
</form>
<style>
.reponse{
margin:10px;

}
</style>
<?php }
}

?>